/**
 * @auth NoahLiu
 * @team 星城前端团队
 * @description 弹框消息
 * @param content 提示内容
 * @param title 提示标题
 * @param icon 消息类型
 */
export default function ({ content = "", title = "提示", showCancel = false }) {
  return new Promise<UniApp.ShowModalRes>((resolve, reject) => {
    uni.showModal({
      title,
      content,
      showCancel,
      success: function (res) {
        if (res.confirm) {
          resolve(res);
        } else if (res.cancel) {
          reject();
        }
      },
    });
  });
}
